package com.dexcoder.controller;

import com.dexcoder.client.WsClient;
import com.dexcoder.ws.GetCountryResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * created by wuyanshen on 2018/1/8 22:27
 */
@RestController
public class IndexController {
    @Autowired
    private WsClient wsClient;
    @RequestMapping("callws")
    public Object callWs() {
        GetCountryResponse response = wsClient.getCountry("hello");
        return response.getCountry();
    }
}